Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce resolver module to the CoreDNS plugin #1105

Merged
merged 3 commits into from
Feb 28, 2023

Conversation

tpantelis
Copy link
Contributor

Currently, ServiceImport and EndpointSlice processing are in separate components, with ServiceImports used for resolving non-headless service queries and EndpointSlice used for headless services. However, the upcoming ServiceImport aggregation changes will require direct coordination between ServiceImports and EndpointSlices for resolving DNS records. Thus, it makes sense to combine the processing in serviceimport.Map and endpointslice.Map into a single component. A new resolver module is introduced to contain a controller component that watches for ServiceImports and EndpointSlices and feeds them into a resolver component that builds internal structs used to provide DNSRecords on request.

Subsequent commits will modify the plugin handler to user the resolver.

Related to #214

nextSmoothWeightedItem should increment 'total' after possibly
updating 'item.effectiveWeight' otherwise 'best.currentWeight'
may not reflect the correct value thereby resulting in the same
item returned in consecutive invocations.

Signed-off-by: Tom Pantelis <[email protected]>
@submariner-bot
Copy link
Contributor

🤖 Created branch: z_pr1105/tpantelis/add_resolver
🚀 Full E2E won't run until the "ready-to-test" label is applied. I will add it automatically once the PR has 2 approvals, or you can add it manually.

Currently, ServiceImport and EndpointSlice processing are in
separate components, with ServiceImports used for resolving
non-headless service queries and EndpointSlice used for
headless services. However, the upcoming ServiceImport
aggregation changes will require direct coordination between
ServiceImports and EndpointSlices for resolving DNS records.
Thus, it makes sense to combine the processing in
'serviceimport.Map' and 'endpointslice.Map ' into a single
component. A new 'resolver' module is introduced to contain
a controller component that watches for ServiceImports and
EndpointSlices and feeds them into a resolver component that
builds internal structs used to provide DNSRecords on request.

Subsequent commits will modify the plugin handler to user the
resolver.

Signed-off-by: Tom Pantelis <[email protected]>
Copy link
Contributor

@vthapar vthapar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, looks good.

@submariner-bot submariner-bot added the ready-to-test When a PR is ready for full E2E testing label Feb 28, 2023
@tpantelis tpantelis enabled auto-merge (rebase) February 28, 2023 13:55
@tpantelis tpantelis merged commit 6371e20 into submariner-io:devel Feb 28, 2023
@submariner-bot
Copy link
Contributor

🤖 Closed branches: [z_pr1105/tpantelis/add_resolver]

@tpantelis tpantelis deleted the add_resolver branch March 12, 2023 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-test When a PR is ready for full E2E testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants